package org.example.afiona.service;

import org.example.afiona.common.VO.ResultVO;
import org.example.afiona.service.VO.OrderInfoVO;
import org.example.afiona.service.config.FeignLogConfiguration;
import org.example.afiona.service.hystrix.OrderFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: leo
 * @date: 2021/6/9
 */
@FeignClient(value = "provider-order-hystrix",configuration = FeignLogConfiguration.class
        , fallback = OrderFeignHystrix.class)
public interface OrderFeignApi {
    @GetMapping("/order/list")
    ResultVO<List<OrderInfoVO>> getOrderListByUserId(@RequestParam("userId") Integer userId);
}

